package net.sunofbeach.blog.controller.portal;


import net.sunofbeach.blog.response.ResponseResult;
import net.sunofbeach.blog.services.INavigationCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/portal/navigation_category")
public class NavigationCategoryPortalApi {

    @Autowired
    private INavigationCategoryService navigationCategoryService;

    @GetMapping("/{navigation_categoryId}")
    public ResponseResult getNavigationCategory(@PathVariable("navigation_categoryId") String navigationCategoryId){
        return navigationCategoryService.getNavigationCategory(navigationCategoryId);
    }

    @GetMapping("/list")
    public ResponseResult listNavigationCategories(){
        return navigationCategoryService.listNavigationCategories();
    }
}
